import request from '@/utils/request'

export const getAdvPosAllApi = (params) => {
    return request({
        url: '/ydd_advpos/all',
        method: "get",
        params
    })
}

// 添加广告图
export const addAdvImgApi = (data) => {
    return request({
        url: '/ydd_advimg/add',
        method: "post",
        data
    })
}

// 广告位列表渲染
export const getAdvposListApi = (params) => {
    return request({
        url: '/ydd_advpos/list',
        method: "get",
        params
    })
}

// 广告位添加
export const addAdvposApi = (data) => {
    return request({
        url: "/ydd_advpos/add",
        method: "post",
        data
    })
}

// 广告位删除
export const delAdvposApi = (id) => {
    return request({
        url: "/ydd_advpos/del?id=" + id,
        method: "get"
    })
}

// 获取单个广告位详情
export const getAdvposInfoApi = (id) => {
    return request({
        url: "/ydd_advpos/rowInfo?id=" + id,
        method: "get"
    })
}

// 修改单个广告位详情
export const editAdvposInfoApi = (data) => {
    return request({
        url: "/ydd_advpos/update",
        method: "post",
        data
    })
}
